package J02treeset;

import java.util.TreeSet;

public class J1tree {
    public static void main(String[] args) {
        TreeSet<String> tree1 = new TreeSet<>();
        tree1.add("z");
        tree1.add("x");
        tree1.add("a");
        tree1.add("m");
        tree1.add("m");
        tree1.add("b");
        System.out.println("tree1 = " + tree1);
        /*
        二叉树
         */
    }
}

class Cat{
    String name;
    int age;
    Cat next;
    Cat pre;

    public Cat(String name, int age, Cat next, Cat pre) {
        this.name = name;
        this.age = age;
        this.next = next;
        this.pre = pre;
    }
}
class CatTest{
    public static void main(String[] args) {
        Cat c1 = new Cat("猫1",2,null,null);
        c1.next = new Cat("猫2",5,null,c1);
    }
}
/*
二叉树，对数据排序，快速查找

 */